#include "gtkcssimagevalueprivate.h"
#include "gtkcssnumbervalueprivate.h"
#include "gtkcssrepeatvalueprivate.h"
-#include "gtkstylepropertyprivate.h"
+#include "gtkcssstyleprivate.h"
/* this is in case round() is not provided by the compiler,
* such as in the case of C89 compilers, like MSVC
#include "fallback-c89.c"
gboolean
-_gtk_border_image_init (GtkBorderImage *image,
- GtkStyleContext *context)
+_gtk_border_image_init (GtkBorderImage *image,
+ GtkCssStyle *style)
{
- image->source = _gtk_css_image_value_get_image (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_IMAGE_SOURCE));
+ image->source = _gtk_css_image_value_get_image (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_IMAGE_SOURCE));
if (image->source == NULL)
return FALSE;
- image->slice = _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_IMAGE_SLICE);
- image->width = _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_IMAGE_WIDTH);
- image->repeat = _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_IMAGE_REPEAT);
+ image->slice = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_IMAGE_SLICE);
+ image->width = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_IMAGE_WIDTH);
+ image->repeat = gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_IMAGE_REPEAT);
return TRUE;
}
};
gboolean _gtk_border_image_init (GtkBorderImage *image,
- GtkStyleContext *context);
+ GtkCssStyle *style);
void _gtk_border_image_render (GtkBorderImage *image,
const double border_width[4],
border_width[2] = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_BOTTOM_WIDTH), 100);
border_width[3] = _gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BORDER_LEFT_WIDTH), 100);
- if (_gtk_border_image_init (&border_image, context))
+ if (_gtk_border_image_init (&border_image, gtk_style_context_lookup_style (context)))
{
_gtk_border_image_render (&border_image, border_width, cr, x, y, width, height);
}